home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Programmation / gray image 2.1 / Makefile < prev    next >
Makefile  |  1995-07-30  |  2KB  |  98 lines

  1. #                Makefile
  2. #     to build and test the general image processing package
  3. #
  4. # To build the library, you may want to edit the list of the library modules
  5. # below (MODULES). Say, if you don't need/want filtering, remove all the names
  6. # that contain 'filter' from MODULES= below. Then make the modules you left
  7. # into the library by
  8. #        make lib
  9. # simple 'make' would suffice, too.
  10. #
  11. # To verify the library, do
  12. #    make check-all
  13. # or, more specifically,
  14. #    make vimage        (checks general image processing)
  15. #    make vrectangle        (checks operations over rectangular areas)  
  16. #    make vimage_io        (reading/writing of various image formats)
  17. #    make vfilter        (checks diff. filtartion and LUT ops)
  18. #    make vmorph_filter    (checks the morphological filtration)
  19. #    make vfractal_map    (checks and shows off cloud generation)
  20. #
  21. # Note, this Makefile was built (and works under) GNU make 3.71
  22. #
  23. # Please check RANLIB below and adjust it to your system if necessary
  24. # (it was made for a BSD-like system)
  25. #
  26. CC=$(HOME)/bin/c++
  27. CCL=$(HOME)/bin/c++l
  28. .SUFFIXES: .cc
  29. MODULES=image.cc image_rect.cc read_pgm.cc write_pgm.cc \
  30.     read_xwd.cc write_xwd.cc read_tiff.cc write_tiff.cc \
  31.     median_filter.cc conv_filter.cc fractal_map.cc morph_filter.cc
  32. LIBRARY=libimage.a
  33. #RANLIB = (ar d $(LIBRARY) __.SYMDEF || true); ranlib $(LIBRARY) # for BSD
  34. RANLIB = /bin/true     # for Solaris 2.x, HP/UX and other SysV-based
  35.  
  36.  
  37. #    Rules, new style
  38.  
  39. %.o : %.cc
  40.     $(CC) $*.cc
  41.  
  42. % : %.o $(LIBRARY)
  43.     $(CCL) $< $(LIBRARY) -o $@
  44.     ./$@
  45.  
  46. % :: %.cc
  47.     $(CC) $*.cc
  48.     $(CCL) $*.o $(LIBRARY) -o $@
  49.     ./$@
  50.  
  51. #    Rules, old style
  52. #.o:    $*.o $(LIBRARY)
  53. #    $(CCL) $*.o $(LIBRARY) -o $*
  54. #    ./$*
  55. #.cc:     $*.cc $(LIBRARY)
  56. #    $(CC) $*.cc
  57. #    $(CCL) $*.o $(LIBRARY) -o $*
  58. #    ./$*
  59. #.cc.o:
  60. #    $(CC) $*.cc
  61. #
  62.  
  63. # Primary goal
  64.  
  65. # Library
  66.  
  67. lib:    $(LIBRARY)
  68. .PHONY:     lib
  69. .PRECIOUS:    $(LIBRARY)
  70.  
  71. $(LIBRARY)::    $(MODULES)
  72. #             Compile the source files that have been changed 
  73.     $(CC) $?
  74.     listobj=`echo $? | sed s/.cc/.o/g` ; \
  75.     ar rv $(LIBRARY) $$listobj &&    \
  76.     rm $$listobj
  77.     $(RANLIB)
  78.  
  79. # Verification routines
  80. check-all:    vimage vrectangle vimage_io vfilter vmorph_filter \
  81.         vfractal_map
  82.  
  83. #vimage:    vimage.o libimage.a
  84. #    $(CCL) vimage.o libimage.a -o vimage
  85. #    ./vimage
  86.  
  87. # Specific dependent goals
  88.  
  89.  
  90. # Dependence rules
  91.  
  92. $(LIBRARY)::    image.h
  93.     $(MAKE) -W image.cc lib
  94.     $(MAKE) -W image_rect.cc lib
  95.  
  96. vimage_io.o:    image.h
  97.  
  98.